Ext.define('App.commons.field.WeekDaysField', {
    extend: 'Ext.form.CheckboxGroup',
    alias: ['widget.WeekDaysField', 'widget.weekdaysfield'],
    columns: 7,
    vertical: false,
    datas: [['星期一', '2'], ['星期二', '3'], ['星期三', '4'], ['星期四', '5'], ['星期五', '6'], ['星期六', '7'], ['星期天', '1']],
    constructor: function () {
        this.items = [];
        for (var i = 0; i < this.datas.length; i++) {
            var data = this.datas[i];
            this.items.push({
                xtype: 'checkbox',
                boxLabel: data[0] + "",
                inputValue: data[1] || data[0]
            })
        }
        this.callParent(arguments);
    }
});